perm filename MUPRT[MAN,LCS]1 blob
sn#063092 filedate 1974-02-21 generic text, type T, neo UTF8
00100 EDITING AND PRINTING MUSIC BY COMPUTER
00200
00300 Leland Smith
00400 Department of Music
00500 Stanford University
00600
00700
00800
00900 The computerized production of printed music presents two
01000 main problems which must be treated. These have to do with the
01100 preparation and editing of the text and the actual creation of the
01200 master copies which will be used as the basis for conventional photo
01300 off-set printing. This last step in the computer process, which is
01400 most dependant upon particular hardware, will be touched on first.
01500
01600 The earliest music printing was done at the end of the
01700 fifteenth century. Since then many processes have been tried.
01800 Woodblocks, movable type, engraved plates and, lately, music
01900 typewriters have been used. Although movable type schemes persisted
02000 into the nineteenth century and various forms of music typewriters
02100 are widely used today, the engraving process remains dominant because
02200 of its flexibility in dealing with the need for a wide range of both
02300 fixed and variable shapes in musical code.
02400
02500 The vast majority of musical symbols are fixed as to shape
02600 and size, however a certain number of these items require complete
02700 flexibility in positioning as well as the appearance of their
02800 overlapping other items. The problem of overprinting notes on staff
02900 lines with consistent accuracy proved a major stumbling block to
03000 movable type schemes. The idea of breaking up the staff lines into
03100 small segments which included the desired notes never produced fine
03200 copy. Skillful use of a music typewriter can usually overcome the
03300 problems connected with the items of fixed shape and size.
03400
03500 The question of how to deal with the variable items has
03600 remained a major problem. In many scores composed during the past
03700 twenty years practically everything is variable. Some of these
03800 scores are admittedly closer to free hand drawing than musical
03900 notation. The older methods of music printing have been unable to
04000 cope with these works.
04100
04200 In what I will call conventional notation, the major variable
04300 items are the ligatures, or ties and slurs, the lengths of note stems
04400 and the lengths and angles of the connecting beams for the quicker
04500 rhythmic values. Several other items may in fact be treated as
04600 variable but usually only a few variants of each are ever used.
04700
04800 In the system of computerized music printing now operating at
04900 the Artificial Intelligence Project of Stanford University the master
05000 copy of each page is drawn by a Calcomp 563 plotter using a felt pen.
05100 When this plotter draws diagonals minutely jagged lines result. Also
05200 all curves must be broken down into a finite number of straight line
05300 segments. For these reasons the master copy is made at about 15O% of
05400 the size of the desired final format. This master is
05500 photographically reduced when the off-set plate is made, thereby
05600 minimizing the shortcomings of the plotter.
05700
05800 Most of the fixed shapes for this printing system are put
05900 into the computer program in terms of data lists of x-y coordinates.
06000 Because of this it is not at all difficult to change details of these
06100 shapes to suit individual tastes. In the first few months of
06200 operation of this program there has been a continuous process of
06300 refining the shapes so that they more closely resemble those in
06400 engraved music. The treble clef used in the first music printed was
06500 made up of thirty-one straight lines. The appearance of this item
06600 has been improved by increasing the number of lines to over one
06700 hundred.
06800
06900 Many musical symbols have traditionally required a changing
07000 line width and several require filled in black areas. (The ball-
07100 point pen has been of limited use to music copyists!) Thus a heavy
07200 vertical bar drawn by the plotter uses seven lines, a single cross
07300 beam uses five lines, etc. Using the plotter in this way has both
07400 advantages and disadvantages. By producing an oversize master, a
07500 great variety of line widths may be created, but since the plotter
07600 moves at a fixed rate, the time required to draw a page of music can
07700 become considerable when there are many solid areas to be filled in.
07800
07900 It would seem that a combination plotter-line printer device
08000 of high accuracy would be the ideal solution to the problem. Or
08100 perhaps some sort of device involving the projection of microfilm
08200 could be successfully adapted to this task. The development of
08300 special hardware of adequate capability will surely come when its
08400 commercial potential is realized. In any case, the Stanford music
08500 printing program, being written in standard FORTRAN IV, can easily be
08600 used in connection with any normal computer interface.
08700
08800 The music printing program, which is called MSS, includes a
08900 switch whereby the output can be directed to either the plotter, as
09000 is the case when the final copy is made, or to a cathode ray tube
09100 display, where further editing may take place. This switch is quite
09200 simple since exactly the same type of instructions are used to draw
09300 vectors on both the plotter and the CRT.
09400
09500 A complete page of music is prepared in sections whose sizes
09600 are limited by the quality of definition and the storage char-
09700 acteristics of the CRT display terminal. There is no limit to how
09800 many sections may be combined to make up a full page on the plotter.
09900 The digital instructions for drawing each of the sections are stored
10000 on separate files in the disk memory. When the operator calls up a
10100 section to be displayed, each item is processed internally in the
10200 order in which it was created and then the complete file is displayed
10300 at once. If there are no time-sharing delays, this process takes
10400 very little time. If the same file is to be drawn by the plotter, a
10500 juggling routine rearranges the order so that items appearing in the
10600 lower left hand corner will be drawn first, with the material in the
10700 upper right corner appearing last. Thus the time required to move to
10800 each succeeding item, with pen raised, will be kept to a minimum.
10900
11000 In the spring of 1973 a Xerox Graphics Printer (LDX) was
11100 installed at the Artificial Intelligence Project. This device
11200 produces very good music copy on 8 1/2" width paper at many times the
11300 speed of the plotter. This copy is completely adequate for casual
11400 use however it cannot compete with the quality of photo-reduced
11500 plotter output.
11600
11700 The preparation and editing of each unit of music is the most
11800 useful, and most complex, work of MSS. Basically, each item to
11900 appear must be entered as a specific list of parameters. However
12000 several automatic features in the program enable the operator to
12100 ignore many of the details. The first parameter, P1, always holds a
12200 code number for a particular item or group of items. P2 indicates the
12300 left-right position. A scale dividing the width of the display
12400 screen into 200 parts can be projected at any level on the CRT. The
12500 position of most items is figured from the left leading edge.
12600
12700 The third parameter gives the staff number. With the present
12800 system it is practical to display up to eight staves at one time.
12900 (There is no fixed limit on how many staves can be included on a page
13000 drawn by the plotter.) A staff in the middle of the screen would be
13100 numbered zero with those above being numbered one to four and those
13200 below minus one to minus three. Where applicable, P4 indicates
13300 up-down spacing in terms of note numbers. The position of middle C
13400 in the treble clef, one ledger line below the staff, has been given
13500 the number one. This basis was chosen because of simplicity for a
13600 musician to think in terms of upward-moving diatonic intervals. Thus
13700 G above middle C is five, the C above is eight, etc. This musical
13800 logic breaks down somewhat when descending below middle C. The
13900 position for B is zero, A is minus one and so forth as the scale goes
14000 down. Since decimal numbers may be used, great flexibility in
14100 positioning is available. Up to eight more parameter entries can be
14200 given for a single item.
14300
14400 For ordinary notes the code number in P1 is one. The
14500 position of the note is set in P2, P3 and P4. P5 serves the double
14600 purpose of controlling stem direction (or absence of stem) and
14700 accidental, i.e. whether the note has a flat, sharp or natural sign.
14800 Usually this parameter will have two digits. If the first (left)
14900 digit is zero (or doesn't exist) there will be no stem. If the first
15000 digit is one the stem will be up, if it is two, down. The second
15100 digit will indicate the accidental which is to appear in front of the
15200 note. Zero means no accidental, one is a flat, two is a sharp and
15300 three is a natural. By adding further digits beyond a decimal point
15400 it is possible to increase the space between the accidental and the
15500 note to any distance desired. This extra space is often necessary in
15600 complex chord structures where accidentals would otherwise overlap.
15700
15800 Notes will be filled in, or "black", unless P6 is given a
15900 negative number, in which case they will be "white", or open notes.
16000 P6 also aids in the automatic alignment of a note with other
16100 previously set notes to create chords. If P6 is ten (plus or minus),
16200 the note will shift to the correct position on the right side of an
16300 upward note stem. The number twenty will cause the note to shift to
16400 the left side of a downward note stem.
16500
16600 A single digit in P7 will show the number of tails or
16700 rhythmic indication which will appear on the note stem. If a
16800 sixteenth note (with two tails) is to be printed, P7 will have a two.
16900 When P7 has two digits the note will be dotted and the second digit
17000 will give the number of tails. Decimal values can be added to P7 to
17100 move a dot farther out from the standard spacing, this being
17200 necessary in some chords.
17300
17400 P8 is used for changing the standard length of note stems.
17500 This is usually necessary when chords are printed and in some other
17600 cases. The unit for extensions is the vertical distance between one
17700 note of the scale and the next. Since notes can appear on both lines
17800 and spaces of the staff, the number two then would extend a stem by
17900 one complete space. The proper number of ledger lines appear
18000 automatically for notes above and below the staff. If for any reason
18100 the ledger lines are not desired the number one in P9 will cause them
18200 to be suppressed.
18300
00100 To display F sharp above middle C as a dotted sixteenth note
00200 on the middle of the screen the following parameters would be given.
00300
00400
00500
00600
00700 P1 P2 P3 P4 P5 P6 P7 P8 P9
00800 ex. 1 1 100 0 4 12 0 12 0 0
00900
01000
01100
01200
01300 Note that P5 and P7 serve double duty. The first digit in P5
01400 indicates that the stem goes up and the two calls a sharp. The first
01500 digit in P7 causes the dot to appear and the two calls for two tails.
01600
01700 Used in this way this parameter system could become rather
01800 cumbersome. The multiple use of some parameters was arranged in
01900 order to save storage space in the program at a time when program
02000 size was a factor in speed under a time-sharing system. However, as
02100 shall be seen later, most of the more complicated aspects of this
02200 system, as applied to setting up individual notes, seldom need be
02300 considered by the operator. The important thing is that if any
02400 particular detail requires changing, the right numbers for the
02500 situation are not too hard to find.
02600
02700 The choice of the specific code numbers to be used in P1 to
02800 designate the various item groups was completely arbitrary. Words
02900 might have been used instead of numbers but there are many situations
03000 where, after a little practice, an all number system can be easier
03100 and faster to operate.
03200
03300 The item put on the screen first is usually a five-line
03400 staff. For this the code number in P1 is ten. P2 will give the
03500 horizontal position for the left end of the staff, P3 the vertical
03600 position number (from minus three to three), P4 the horizontal
03700 position for the right end of the staff and a number in P5 will cause
03800 any desired vertical displacement. From this point on any item that
03900 is to appear in relation to this staff will use the same value for P3
04000 (vertical position number). If P5 has displaced the staff by any
04100 amount, automatic adjustment will be made for all items appearing on
04200 that staff. P6 can be used to alter the vertical size of the staff.
04300 The dimensions of all items thereafter put on that staff will be
04400 controlled by the number put in P6. In music engraving only a few
04500 basic sizes are ordinarily available. With this computer system the
04600 flexibility is complete.
04700
04800 Because of their variable lengths and slopes the heavy cross
04900 beams which connect the notes of smaller rhythmic values present a
05000 number of problems. The code number for beams is nine. P2 has the
05100 position of the left side of the beam or beams. Since it would be
05200 time consuming to ascertain the precise position of any note stem
05300 this number need be only approximate. Before the beam is drawn the
05400 exact position is found by the program and the number in P2 is
05500 properly adjusted. As usual, P3 holds the staff number. P4 and P5
05600 are the vertical levels of the first and last notes to be connected
05700 by the beam. The approximate horizontal position of the last note is
05800 put into P6. As with P2, the precise position is found
05900 automatically. The proper slope for the beam is determined by the
06000 program's consideration of P2, P4, P5 and P6. Of course it is
06100 necessary to tell whether the stems are to go up or down. A first
06200 digit of one (up) or two (down) in P7 conveys this information. The
06300 second digit in P7 will tell how many beams are to be drawn.
06400
06500 Partial beams are sometimes needed. If P8 has a ten the
06600 partial beam will be attached to the first note stem; a twenty puts
06700 it on the last stem of the group. The end point of the partial beam
06800 is put in P9. P10 is used to displace the beam from the outer limit
06900 of the stems toward the note heads (necessary with partial beams).
07000 After all the beams are in place a special feature may be used which
07100 automatically adjusts to the proper length every note stem falling
07200 within the span of each beam. An example of beam drawing parameters
07300 is given.
07400
07500
07600
07700
07800
07900 ex. 2
08000
08100
08200
08300
08400
08500
08600 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10
08700
08800 9 51 0 3 2 83 12 0 0 0 (sets the two upper beams)
08900
09000 9 51 0 3 2 83 11 10 54.5 2 (sets right partial beam)
09100
09200 9 51 0 3 1 83 11 20 68 2 (sets left partial beam)
09300
09400 The upper two beams are described within one set of
09500 parameters since they have the same characteristics. The two partial
09600 beams must be described separately. It must again be pointed out
09700 that the operator need be concerned with these details only when
09800 making changes after the original input stage. In the first input
09900 the rhythms must be given and then it is only necessary to state that
10000 the group of notes from 1 to 7 are to be beamed; then the program
10100 creates the three parameter lists shown above. The "homing" features
10200 used in beam drawing are also used to facilitate the precise
10300 placement of various markings such as accents and staccato dots.
10400
10500 There are some code numbers which are used to produce groups
10600 of items which can later be edited separately if desired. The number
10700 sixteen allows the writing of any letters or numbers into the score.
10800 It is possible to place the beginning of a line of text at any
10900 position and the size of the letters is flexible. Bold face printing
11000 is simulated by duplicating each letter with a slight displacement.
11100 The elegance of the letter shapes has not yet been considered since
11200 it is planned to have a wide variety of type faces when different
11300 hardware for the creation of the master pages is developed. The code
11400 number eighteen causes key signatures of any number of sharps or
11500 flats to be written when only the clef name and the major key are
11600 entered. The accidentals will automatically be positioned in their
11700 proper places for the given clef.
11800
00100 The most useful item-grouping in MSS is available under the
00200 code number fourteen. With this number extended strings of notes,
00300 along with most of their accompanying details, can be entered at
00400 once. The program prompts the operator for the various kinds of
00500 information required. The first prompt asks for the notes to be
00600 typed. All notes are typed by letter names with a octave number and
00700 a letter (F, S or N) for the accidental if needed.*1. So that the
00800 notes will appear at the proper levels, the clef must be given at the
00900 beginning of the line and each time a change of clef occurs. A colon
01000 following a note indicates that the note will appear in the same
01100 rhythmic position as the previous note so as to produce a chord. In
01200 some close-knit chords the notes must appear on alternate sides of
01300 the stem and accidentals must be spaced out. This section of MSS
01400 takes care of these things automatically. The following example
01500 shows some results of this chord-spacing procedure.
01600
01700
01800
01900
02000
02100
02200 ex. 3
02300
02400
02500
02600
02700
02800
02900
03000 The second prompt asks for position one and position two.
03100 These numbers will set the horizontal limits within which all the
03200 given notes will fall. At this point the notes will appear on the
03300 CRT as equally spaced quarter note values. Next, the operator will
03400 be asked to "TYPE RHYTHM". The denominators of conventional musical
03500 fractions are used. Thus four equals a quarter note, eight an eighth
03600 note, etc. Dots added to these numbers will produce musical dots.
03700 Now the music on the screen will be repositioned relative to the
03800 given rhythmic values. All the proper rhythmic tails will appear and
03900 the half notes and whole notes will change to "white" notes.
04000
04100 Next the operator will be asked, "ADD BEAMS?" If these are
04200 needed, pairs of numbers, indicating the first and last note of each
04300 beamed group, must be entered. If a group is to have its stems
04400 turned downward, the second number of the pair must be negative.
04500 Most combinations of partial and complete beams will be created
04600 automatically according to the rhythmic values previously given for
04700 the notes in the group. After the beams appear all unnecessary tails
04800 will disappear and the stem lengths will be normalized. After this,
04900 similar procedures are followed to add accents and staccato dots,
05000 etc. to the passage and then slurs and ties. Following is the
05100 operator's input to create the music of Example 5:
05200
05300
05400 TR/K2S/4 4/D5//E/R/M/F///B4/E5/G/M/G/F/E/D/E/F/M/F/E/D/E/F/M/*
05500
05600 4./8/4//4./8 X 6/4/8///4/8/16//4/2*
05700
05800 7 9/ 16 18*
05900
06000 7 9 2/ 10 11 1/ 15 16 1/ 15 18 2*
06100
06200 In the first line TR stands for treble clef. K2S indicates a
06300 key signature of two sharps. 4 4 is the meter. The note D is to
06400 appear in the fifth octave of the piano keyboard. R is a rest and M
06500 is a measure line. The second line gives the denominators of all the
06600 rhythmic values. The third line tells which notes are to be beamed
06700 together. The line for accents, etc. is omitted. The last line
06800 gives the location of the ligatures. The third number of each group
06900 indicates the curvature desired.
07000
07100 The horizontal spacing of printed music is usually related to
07200 the rhythm in only a general way. Following the directions outlined
07300 above, the sections with quicker values will be closely bunched
07400 together while the slow values will occupy rather large areas. By
07500 using the editing techniques available in MSS a special line of
07600 rhythms may be set up at the top of the screen which will control the
07700 spacing of everything put below. What this does in effect is to
07800 change internally the values of the horizontal spacing numbers. For
07900 example, if a whole note is made to occupy the same space on this
08000 highest line as a following quarter note, then the program will
08100 consider the space under the whole note as being four times as great
08200 as that under the quarter when the automatic "equal" spacing takes
08300 place. In this way the practical, readable spacing of the music is
08400 easily managed.
08500
08600 Example 4a shows an extreme case of what can happen if strict
08700 rhythmic spacing is adhered to.
08800
08900
09000
09100
09200
09300
09400 ex. 4a
09500
09600
09700
09800
09900
10000
10100
10200
10300 Example 4b shows how the use of the spacing line can produce
10400 a readable form of the same input.
10500
10600
10700
10800
10900
11000
11100
11200
11300 ex. 4b
11400
11500
11600
11700
11800
11900
12000
12100
12200
00100 The spatial problems of entering the text in vocal music are
00200 greatly facilitated by a feature which displays order numbers over
00300 the notes of a given line. The various syllables and dashes are
00400 typed in with slashes separating each group of characters requiring a
00500 unique position. Then a parallel series of numbers are entered which
00600 will designate the precise position for each of the groups.
00700
00800
00900
01000
01100
01200
01300
01400 ex. 5
01500
01600
01700
01800
01900
02000
02100
02200 Input to MSS for text: KY/-/RI/-/E,/KY/-/RI/-/E/ etc.
02300 1/1.6/2/2.6/3/4/4.7/5/ etc.
02400
02500
02600
02700
02800
02900 Most of the conventional musical symbols are available in
03000 MSS. Any special shapes may be created by use of a subsidiary
03100 program which allows you to draw on the display screen either by
03200 typed commands or by use of a light pen. Expanded outline drawings
03300 are made and then any areas may be designated for filling in. One of
03400 the more complicated parts of MSS is the routine whereby the dark
03500 areas are given exactly the right number of lines to properly fill
03600 them regardless of the overall size factors. Once a shape is
03700 completed it may be freely edited. Points may be moved, inserted or
03800 deleted. When the shape is used in a score it may be inverted or
03900 reversed or expanded or contracted by varying the proper parameters.
04000 Scores including a combination of ordinary and non-conventional
04100 graphic notation will be easily produced.
04200
04300
04400
04500
04600
04700
04800
04900
05000
05100
05200 ex. 6
00100 Perhaps the most important elements of MSS are its various
00200 editing features. Once any group of items is set up it is essential
00300 that corrections of all sorts can be made with a minimum of effort.
00400 The program has given each symbol entered an item number and it is
00500 quite easy to seek out a particular item for editing. The items may
00600 be searched for by number, by category (i.e. notes, beams, letters,
00700 etc.) or by position. A box appears around each item as it is
00800 brought up for editing. Once the correct item is found, all its
00900 current parameters are listed on the bottom of the screen. New
01000 values may be given for any or all of the parameters. The old form
01100 of the symbol remains on the screen while the newly edited form is
01200 created. When the edit mode is left it is possible to delete or save
01300 the old form of the symbol. In this way it is possible to copy any
01400 single item from one place to another by typing only the new
01500 position parameters. There are also ways to copy whole groups of
01600 items from one position to another. MSS allows for the expansion or
01700 contraction of the horizontal spacing on any staff, or on all staves
01800 at once. This is usually used as a last step to arrange the various
01900 parts of completed lines into a visually pleasing and readable whole.
02000 By typing J, an entire brace of music, including several staves, can
02100 be properly justified at once. Space will be "stolen" from the
02200 slower rhythmic values and from notes without accidentals in order to
02300 provide the minimum space requirements for each type of item.
02400
02500
02600
02700
02800
02900
03000
03100
03200
03300
03400
03500
03600
03700 ex. 7
00100 All work done with MSS can be stored on various memory
00200 devices for further use. When a particular unit of work is called
00300 back into the program it may be combined with other units or edited
00400 some more or sent to the plotter for the production of hard copy.
00500 When a section is plotted, the overall dimensions may be adjusted to
00600 any size desired.
00700
00800 With older music printing methods, the parts for individual
00900 players of an ensemble piece had to be created separately. With MSS,
01000 the extraction of parts from a full score can be done automatically
01100 using a small subsidiary program. Some spacings may have to be
01200 changed and full measures of rests combined, but little other editing
01300 should be necessary.
01400
01500 While MSS has been conceived for use on a time-sharing,
01600 display oriented computer system, a practical variant of the program
01700 could be developed for the archaic punched card systems. In this
01800 case a considerable amount of advance planning of layout would be
01900 advisable so that not too many plotter runs for proofs would be
02000 needed.
02100
02200 It is reasonable to predict that some computerized system
02300 such as the one described will eventually be utilized for most music
02400 publication. The time required to set up a page with this system is
02500 already competitive with good hand copy work. This time is much less
02600 than that needed for engraving or music typewriting. None of these
02700 older methods can match the ease of editing and entering corrections
02800 of all sorts that a computer program can offer. As computer time and
02900 equipment become less and less expensive it seems likely that this
03000 method for printing music will prove to be economically attractive
03100 and, as a result, present day composers will gain much more ready
03200 access to quality publication.
03300
03400
03500
03600
03700 Notes
03800
03900 1. The conventions for musical input in MSS are very similar to
04000 those used in an extensive program written by this author for
04100 translating musical terminology to input for a computer sound
04200 generation system. A description of this is found in, Leland Smith,
04300 "SCORE- A Musician's Approach to Computer Music," Journal of the
04400 Audio Engineering Society, Jan./Feb. 1972, vol. 20, number 1.
04500 Especially useful in SCORE are the several ways of efficiently
04600 dealing with the various kinds of repetition found in most music.